import store from '@/store'

//判断页面是否有权限
export function isPermission(path) {
  const { allMenus, user_menus } = store.getters
  const menus = allMenus.find(item => item.path === path)
  if (!menus) return true
  return user_menus.find(item => item.menuId === menus.id)
}